package GoFComposite;

public class TestDing1
{
  private static AbstracteExpressie instance = null;
  
	public static void main(String[] args)
	{
	  System.out.println(getInstance().GetValue());
	}
	  
	public static AbstracteExpressie getInstance()
	{
	  if(instance == null)
    {
      MinExpressie exp1 = new MinExpressie();
      exp1.AddWaardes(new Getal(5), new Getal(7));
      ProductEpressie exp2 = new ProductEpressie();
      exp2.AddWaardes(exp1, new Getal(8));
      PlusExpressie exp3 = new PlusExpressie();
      exp3.AddWaardes(exp2, new Getal(4));
      instance = exp3;
    }
    return instance;
	}
		
}